put javascript in javascript file as it should be