implemented PID regulator to increase accuracy