update sqlite code using new library