adding support for both 1.x and 2.x with no code changes