Added ratechange event handler to update GUI