exchange function is added