updated bounce code