added directory flag