add connection and query select