for loop still returns errors