put blocks in right order