Added use of Sqr function.