added directories function back for menu