add dir support