testing writing all protocol messages but not working