better directory selection