Refactoring for greater compatibility