implemented nscoding