move js into seperated file