add object func to the context of onChange callback