Added square root algorithm