adding database queries