working solution without break