reimplement Mapper.from_h