added message sending and reading