added units tests and passed them