doing algorithms