the replay function works