the code of addCaltulator