changed loop to testing