ported from vibration,has errors.