transactional memory implementation