getting rid of unwanted code