timer for random and cleanup