faster kernel matrix creation