add rate button logic