Selection code and discussion