added objectmapper moved some work in it