replace sqlitePlugin and change necessary code