database functionality simplified, unfinished