added toPreOreder() method