add dissconnect support
remove unnecessary code