adding doc strings.  removed walk function, no longer necessary.
adding doc strings. adding t_val and h_val to make code more readable to explicitly describe that params are meant to be passed by value.