moved seq to seq2 and fixed print_tree