added database support for folders