use filepath.Walk, refactor a bit