a simpler algorithm