update logic and styling