I've coded up to the middle of the block rotation process.