implement root() method