added rate endpoints and unit tests