slight refactoring of 1.6 and 2.3