change db variable to d