inlining
minor refactor