More changes on calculator algorithm~