algorithm outline