If you’re riding to work before you’ve had your morning coffee, this bike does the thinking for you: If a street is closed for construction or if you get to the subway station and your train isn’t running, it automatically reroutes you. It also helps keep you away from the most pothole-filled roads and the intersections where cyclists are most likely to be hit by cars.

“We set out to re-design the bike commuting experience, not just to design a new bike,” says Manuel Saez, CEO of Brooklyness, the company making the new bike, called the CMYK 4.0. “It’s a holistic experience. We leverage technology to enhance that experience, and the intelligence in the bike is meant to connect with and make the rider aware of his or her environment in order to make better decisions, and enjoy the ride.”

The bike is connected to an app that runs as you ride, displaying everything from step-by-step navigation and train schedules to how quickly you’re pedaling and your heart rate (the handlebar automatically senses your pulse as you ride). Your phone slips into a pocket on the handlebars and charges as you pedal.

As you ride, the bike also automatically collects data for other cyclists. A gyroscope senses bumps on the road, helping create a crowdsourced map of cobblestone streets or others that need repairs. “This came as a wish from a user: ‘Wouldn’t it be nice to know beforehand which street to avoid?'” Saez says.

Though the crowdsourced map will get more accurate the more people are riding the bikes, the designer say that even one person on a bumpy road is enough to mark it for everyone else. The map also pulls in data from police reports about accidents, and riders can add more details about especially dangerous streets.

The designers spent five years working on different versions of the bike, always focused on what they see as the major reasons people don’t bike more often: Comfort, safety, and security. The bike has a 250 watt electric motor that kicks in as someone pedals, helping riders get up hills without breaking a sweat. The app helps make rides safer, along with built-in lights. Two lights project from the back to mark a short “bike lane.”

To make the bike more portable, it only weighs 25 pounds, and the handlebars, seat, and pedals fold or retract to make it more compact. “Regular e-bikes are heavy and in most cases over powered for what people need,” Saez says. “More power does not mean a better bike.”