implement program parsing