added square root code