refactor folder listing