Completed ch1 example