refactor and repair bugs in driver, box and box collection