simplified drawBoundBox function