implementation of compatibility mode v4