Why is this function on the scope?