validated using jsLint