added separate js file
formatting