Added modes to the 'rate' function.