merged with old unit tests. Added more unit tests