added "directory" method