wrote generic proxy code