changed theoretical ion function