code clean up
moved code block.