add exception handling for negative numbers in factorial method