added harers matlab code