cleaned up calculator