remove unnecessary assignments