Work function values from contact potential difference measurements