attempts to use read-lines
move analysis out of main