Update ruitine to return correct values. Added status PV