working on replay functionality