refactor DIM now generic