Added a working example with naïve approach