fix assign method accepting json now