line parsing and tokenizing