Implemented regularize