completely replaced dofile with require