implemented Directory preview