added receive_msg function for behaviours