unit testing program. used pytest to check.