  The problem of representing a given positive integer as a sum of four squares
of integers has been widely concerned for a long time, and for a given positive
odd $n$ one can find a representation by doing arithmetic in a maximal order of
quaternion algebra once a pair of (positive) integers $x,y$ with
$x^2+y^2\equiv-1\mod n$ is given. In this paper, we introduce a new method to
find a representation of odd integer $w$ given $x,y$ satisfying the above
requirement. This method can avoid the complicated non-commutative structure in
quaternion algebra, which is similar to the one we use to obtain a
representation of a prime $p\equiv1\mod4$ as sum of two squares by doing
continued fraction expansions, except that here we will expand complex number
using Hurwitz algorithm.
