Placed algorithms inside testing loop

Results of test are also exported to a CSV file