added directory code