initial parse and check functions