removed the replay function causing infinite loop