finished javascript work