put js code in separate file