added validator.js