working on euclids algorithm