index<0 check