Step forward in epidemiological modeling: Introducing the rate indicator function to capture waves