handling value as a object instead of hash