added code to do_getdent