refactored distribution formatting