finished Inode.java (not yet tested)