Reimplementation of Root