now just removing the nonzeros inside the main loop