improve rectangel splitting