moved index page js to separate file