update to match exercises in book