created more essential db functions