making javascript-friendly