update problem1 js with working file