Add mode and happiness algorithms