processing input on main.html