add program parsing logic