minor modifications for directory dependence