removed unused and dead code