Reworking rotate function again