switching from sqlite3.Binary to buffer