clean up proxy function