inital working version for review

@jarv @feanil 
should an exception be raised here if there is a message that cannot be identified?