fixed updated after assign function