more optimizations in eval.c: change sq sequentially