added new functions and code to run simulations to see if choosing a certain number of squares is advantageous