Used simpler code in named captures.