implemented sending messages