removed unsude and uneeded code