create epi list in a function