add error managnent and disconnect method