remove useless instructions