removing unnecessray codes