adding snapthots functionality