reformatted and changed emphasis to aid understanding