implemented "connected" state