fixed js and formatting