Added arithmetical functionality for base cases.