calculator example working