added directory option