simple parser for the program