HW3 3.3: Fixed some recipe functions in db.py