added remove_snapshots function