Added maxj mode