Comments have been adjusted for better readability