add line counter, start improving line parse