change to foreach loop in findDecls