implementing rate limit checking. fixes #26