swapped SGD method to CM