refactor to allow for better check detection