start namespace matching code