nearly functioning parser