Edited to remove some errors missed in the first edit