add rebound logic