adding more psuedo code in for Calculator for Rules