added test7 for throwing exception if neg numbers