added state check for snapshot