Removed test. Fixed the for loop to use the correct data