added pi0<=0 check