refactored end distribution files