added scripts from hoffman2 to study the effect of penalty