Added setProxy function