removing redudant code