add print in receive message function