fixed up unit tests and made them work