unit test added for factorial