added norm_fit program and check there is enough data for a robust fit