refactor delete_snapshot for readability