adding message validation