code improvement

preventdefault