Adding logic to interpret messages