added printing, checking, min, max, pre-order functions (all tested)