removes unnecessary code