A functional analysis of the role of mood in affective systems.