removes unnecessary boxing and unboxing