partial work for building conditional prob model