finished Root.java