add rewinding functionality