move the logic for different versions out of __call__ into methods.