improved the updateTextViews method to increase efficiency and scalability