generic (almost) mapper