putting printf in receive