Added function to make it easier to rotate two dimensional arrays