How loneliness works