moved js to public