only store valid programs