generating Sqr