maybe reworked and passing tests. may need more robust testing and definition