added checking for 0 samplers