added tims rotate functions