The world has been moving towards urbanization for the last 500 years. Already more than half of the world’s population lives in a city, and it’s a trend that is growing.

But cities are complicated places, with problems of their own – and one of the biggest challenges facing city leaders is to make people feel they are part of a community. Otherwise, the result is a city where people feel lonely, ignored – and resentful of those around them. Forging a diverse population into a community will help to significantly alleviate these problems.

What’s “wrong” with cities these days? For one thing, many residents feel cut off from others, leading to feelings of loneliness – a big enough problem in the UK that the government there last year appointed an official “Minister of Loneliness,” after a 2017 report said that over nine million Britons “often or always” felt lonely.

Cities, despite the fact that they theoretically offer the possibility of fostering relationships, due to the sheer number and variety of people living there, can be awfully lonely places; a survey by TimeOut London showed that feelings of loneliness were rife among residents of the world’s biggest cities, like New York, Los Angeles, and Tokyo – and that 55% of Londoners said that their city could “sometimes be a lonely place to live.” Indeed, just 7 percent of Londoners strongly agreed the city was a good place to make new friends.

Why? Sociologists give numerous reasons: Most city dwellers work hard, so they don’t have time to go out and meet people; there is a lack of a sense of community, because everyone is from a different place and cultural background; and because of the design of buildings and neighborhoods, people barely see their neighbors. In addition, many people have come to rely on social media for their meaningful relationships – but a study of heavy users of social media indicates that they are more likely to feel lonely.

Besides being unpleasant, researchers have found that feeling lonely can literally kill you – to the extent that feelings of loneliness can actually weaken the immune system, making vulnerable populations like the elderly more likely to contract life-threatening diseases.

“Fighting the power” is another major issue for city leaders these days. When residents feel they don’t have a stake in what is going on – when they feel their concerns and needs are not being taken into account due to other interests – they are more likely to oppose change that could make life better for everyone.

That kind of situation often leads to a “Not In My Back Yard” attitude – residents oppose projects that could bring great benefit to the many because of perceived damage to themselves. One good example of this was Amazon’s decision to cancel its plans to open a second headquarters in Long Island City. The move would have brought 25,000 jobs to the area and would have seen Amazon paying a slew of taxes – but likely an increase in housing prices and rents, along with increased transportation problems in the area, both of which raised the ire of local residents.

Other New Yorkers opposed the plan for their own reasons, but there’s no doubt much of the opposition was due to what the impact on Long Island City and Queens in general would have been. Would things have been different had city leaders done a better job of explaining why HQ2 was a good idea – or had they fostered a more cohesive community?

Exacerbating this situation is the recent growth in gentrification in many cities; while studies show that gentrification doesn’t necessarily push out the poor from neighborhoods they have inhabited for decades, the perception in many places is that when a neighborhood gentrifies, long-time lower income residents – especially those who don’t own their own homes – are going to have to find a new place to live. That’s a sure-fire recipe for community divisiveness.

And the lack of community in cities is what leads to a host of ills – from the atomization of communities and individuals, to mutual suspicion between individuals, groups, and law enforcement, to higher rates of crime, to increased levels of mental health problems and even suicide. Cities around the world are suffering; in many of them it’s rich vs. poor, old-timer vs. newcomer, us vs. them.

It’s no way to live – but the good news is that people in cities don’t have to live that way. Uniting diverse people and communities around a common, positive goal makes governance much easier, enables cities to move ahead with projects that will benefit everyone, and makes people feel connected, reducing levels of loneliness and making them feel more empowered and valued.

The question, of course, is how. Technology could provide some answers here.

While electronic voting is probably still years in the future, electronic community and town meetings are feasible right now. Providing access to those meetings via the full range of popular communication tools – Facebook, Whatsapp, etc. – will go a long way to making people feel that they are part of the process, not the victims of it – giving them a greater stake in ensuring that the right decision is made.

Technology can also help bring together diverse individuals and communities in helping them more easily battle common problems that affect everyone. For example, city and town social media groups have taken off, discussing issues of local concern, from events to civic problems that need addressing. Local police stations have taken to Facebook to share pictures of lost dogs they’ve found – increasing rescue rates and community sentiments about the police force. Town libraries are starting online book clubs and community cultural discussions. And across all sectors, services are becoming more accessible and more user-friendly online.

A more ambitious project could be the development of a digital city coin – an app-based coin that is accepted as payment by local stores and service providers, emphasizing the importance of the local economy to consumers and providers. Cities developing their own local coins is one way to keep locally generated money in the  city, and to engage tourists as well. It’s an idea that is picking up steam, and is being implemented in Belfast and considered by New York State, Berkeley, and others.Beyond their soaring skyscrapers, cultural advantages, and nowadays their often lively and relatively safe downtowns, cities are hurting. There are tens of millions of Americans who live with high crime (violent and property), more hatred, more misery and depression – even more sadness. Many of these problems can be traced to a lack of unified community. If we’re in it together, we’re going to care – but if it’s every wo/man for themselves, then people will  look out for number one. To encourage more of the former and root out the latter, cities need to embrace new ideas. City leaders must work on this, if they want to truly create an urban identity for their residents. Fortunately, technology available today gives leaders the tools they need to achieve this more easily and efficiently.

Amos Meiri is CEO and Co-Founder of Colu