removed penalty function (from comments)