move writing of out file to function + reduco output to interp points of sequence