Nval=1 case added