makes use of row_factory