Added code regions to enhance readability