removed data.mat dependence on the code