changed so that pending payments are flagged