Changed the first example so that it returns a value