Added function body to getHeader

getHeader was missing a function body
These variables should be declared within the `for` loops.