Move the selecting logic to Box class