This is my implementation for the Euclidean division algorithm