added sqlite3 database support and functions