added 'anytime' logic