removed rundandant code