improve require definition