take function to create dirs and go inside them.