modified the 1st example to include the require statement