finish calculator functionality