with db connection