needed to switch the type of messge