change types of an instance