fixing output so it appears in serial