add --select support and simpler error checking