made separate js file