change type variable from value to object