Adding midding definitions of the db variable.