extracted js to separate file