some updates
extract create root folder , bd function