add distribute logic