js compete change

changed js. Now it's working different then preveus