improving javascript code
new ui and show message when input is empty