no 'var' on p here (it is intended to be function local, right?), I think always using var is good