adds Sqrt function and sample code