Defining loops for numbers in preview