implemented basic PID control