use transactional variable to more efficient