move code block to the right place