added functions to list a directory using the gen query API