updated unit tests for DRY