add $userData argument so that the walk matches array_walk