cleanup in the method that calculates what is to be processed