refactored grace period