minor speedups