Code refactor

think about refactor the code so we do not always specify which div we
are updating