var at the top of the function