Moved bounce function.