fix implicit return
add example as test