added parseFolder function