some speedups