added function inlining