CHANGE: loop to go over different 'p' values
CHANGE: loop to go over different 'p' values