apply spmat changing variable names