remove useless assignments