add ext adaptation feature to looping function