accel alg cleaned up