added logic for requiring all js files