updated Calculator

fixed several bugs