Added a variable to change the number of pieces made per execution.