main parse program