removing redundant assignments