adding  function to read egecounts