fix accel function and period init