minor changes and use of @func for pathwalk