What is the point of setting ret here? I don't see it being useful.