Added JavaScript code