Added better rotation functionality