improve solution for maximal rectangle