modified require function
modified require function