refactor for folder