add rotation, create inner data structure