Added comments for better readability