working rotation and flipping, wooooo