Functions for receiving the possible messages implemented Main structure of functions included as an outline