added clas for checkong interrnet connection, refactor in dialogBuilder