solution to Rotate Image