Just curious why ```trEndCount``` is defined in the scope of ```slide``` function and not in the promise one below?