i thought it would be clearer to put it outside because javascript does hoisting. However I guess I wasn't being consistent about it either in the code.