fixed bug in adding