rearange for inlining :/