Add bbox utility function