small reposition of code