Modified to incorporate multiple methods and grid sizes in a loop.