now painting the corresponding bar and resetind the others