done with select function, but it takes long time to get response, about 10s,no idea why.