turn path macros into inline function