implemented objectmapper

currently outputs to file