use bounds instead of frame in rotation code