calculator from lecture 2