added second loop distribution