change method function on receive message