1. add function for total distribution