moved js to erb