function declaration
hoist vars and functions

closes #7
walkBlock -> walkAll