add is_deleted function