removed duplicate function for rotation, edited spaces