corrected the assignment error