Added functionality for changing rate.