Need a general PI scheme for this situation