functions can only be declared at top-level or immediately within a function