Moods may have an evolutionary purpose