cleaned up boxplot selection code