completed smoothing; added  option to write rhoToa to output product