added box detection