added document notation to js file and may have fixed