setting up code for v2 sqlite