added pagesDir method
upped version