got first db query to work