moved js to component