Added interaction with db.