changed to another solution to fix the bug for QSDexpand