correcting assignment error