Added newchains ref.id.assign functions

ref.id.assign function does not work - get null result.