Added distribution detection