updated example to show expected return types