added bounciness function