saving output seems to work