removing unnecessary codes