added initial replay functionality