Added some rotation based code