removed a bug in the rotation operation, now GUI is not mandatory to operate