I guess the Order term is causing a problem for some reason (if i subs sin(x) for xin and x for yin)