Solved the problem in JS.