introducing createFileTree() function