update example to return value