Added replay() function