Store objects in variables of proper type