Included answer for 5.9 - implementation of P-controller