fixed strdup problem. changed normalization factor.