change the bouce algorithm

change the bouce algorithm