set threads equal to p only for p>1