initial compiling implementation of maxrects