fixed appending output