added new check of division by zero in squre root method