updated PID control and hopper functions