moving stuff to use sqlite3 database