factorize start and last initialization in front of the if statement
I agree with your change. For now I just put the initialization of start and last in front of the if statement. Ultimately, start and last should be initialized with some options set by the user (or their default value)