Changed method scanner according to received message.