some logic in rotation loop