updated JS for consistent styling