add function to get the logscore