implemented maxlength on input