calculator: add simple function