smart proxying function finished