first input parsing