cleaned up some private db functions