adding adding method to calculator class.