reworked unit tests