renamed blockwise optimization
new penalty function for stochastic optimization