figures added. text reviewed ch 6 algorithm