fixing output data addition. Adding to correct position