parseLine ported

 - untested!