Why is this a loop when the first thing is a return?