maxrects implementation done.