fix bugs and get dalliances to work