Lorin's solution to the selector code challenge