Rotate function works, but need to complete functionality.