default ratelimit
Move ratelimit logic into separate function