changes to use switch statement based on state when parsing lines