uses same pattern about assigning ret
directly returns ret