The first working solution