getting rid of unnecessary code