added more unit tests to match logic