Added directory functionality