first pass at preflight check
refactored preflight check