Added blocks to code