Implement select() to pass tests
Test select() a bit more thoroughly