implement the require function of AMD