packaged DS, refactor