Updated example for guard clause and other changes suggested.