updating test examples to correctly handle return values