using sqlite update instead of raw sql