created utils class for encoding complex types
replaced string based values with object serialization.