comments added to improve readability