looks like some of these changes are mine