removed some redudant code