Both the deletion check and insertion check needs to happen