Solution to 1.6 (image rotate)