original copy from reStInPeace_beta_0.8