improving foobar example