switched to chai assertions, more tests, in process of testing and refactoring engine