rotating A and B box