error in CA calculation fixed