replaced dofile with require