updated sqlite script