calculator using link stack