Adding from private fork of PkModeling.