added rate limiting and connection limiting