refactored and added dummy root option