moved createProxy logic outside load method