yes it defines the same function each time the outer function is called