functions chapter edited