Adds replay functionality