comments added for clarity.