some comments added for clarity @ev