adding convenience function for getting database