refactored js
input box overlay finished