cleanup and put placeholder for matrix