removes unnecessary res object