refactoring
show connection state to user