Added euclids algorithm