simplify code for maximal rectangle