took out all but simplest @jit functions