worked on euclidean algorithm functions