FINALLY added message sending logic.