exclude common part from adaptive algorithms to new function