improved select_test