control message function