Moving code to code block