less naive way to figure out where to put return-s