some frontend improvements and use setTimeout for call the update function