implement for dir