adding basic db functions