modified profit and min