edited for readability up to section V