removed redudant code, etc.