transaction calculation coding added in update action