refactoring needed because of ARQGRA-170
a bunch of compatibility fixes because of ARQGRA-170