Added Root function with test