sqlite code additions