capture input line and parse