New version that allows user to set number of seconds for rotation