now the percentage is dynamically updated