removing useless statements