Wrote a method for selecting boxes.