implemented inlining