added database and switched to SQLite