initial rectangle packing code