begin functionalizing syntax checker
move vars inside function
first draft, functional, dynamic
fnished