refine program input parser