correctly implement right rotate