added option for custom root path