add process lines and sort method
adding tests for sort, process_line