Reorganized and added rotation