add update message logic
Merge pull request #2 from SpyMaster356/messageLogic

add update message logic