refactor boundbox