added first db functionality