moved lw related js out of html to own js file