first time through writing the algorithm section