Updated for SQLite