initial check detection, start of refactor