Ammended the rotate function so that it didn't use built in transformation functions that weren't include in android