db is the connection