added messageCheck