some algos from homework