some improvement

- data transmitted to client are cleaner
- disconnection is implemented