Detect distribution