removes unnecessary code from example