A new energy-based ground motion selection and modification method limiting the dynamic response dispersion and preserving the median demand