reset logic