Added matchSingleton function.