changed apiconnector, excpetionhandling and disconnect