adding age validator to js file