introduce version switch, to make dialyzer rather happy