Why is this returning a function? I'm confused.