minor comments added for clarity