added some more interesting algorithms from class