fix printing, improve getLCA()