now with db connection