How to run through a loop once - and then resetting to make it available again