finished all dist code