add row parser, slightly redesign, define returning prototype