adding database interaction