refactor of sales engine -- tests broken