working (crappy) implementation of a mapping to an object