cleaned up proxy selection