updated solution