added factory to provide objectmapper