fixed bug in adding assignment