merge ties branch into psi2