finishes stmt checking function. Need clarification on if, for, while.