pulled all decls up to the top; for loops working again