revised with Ed