started adding logic for proxy support #6