Refactoring and changing threshold for VPM