move require-package function