add sqlite3 and core data function