adding new file with eMG algorothm
var x is not defined, use instead x_k
first part of algorithm