add rate functionality