remove unnecessary assignment code