useless variable removeal