Update Avery's code