rewrote rate limiter to time based smoothing buffer