Added validation for input.length >3