add code support for distribute