made formatting of js code