improved compatibility with version 3