add some dir functions