introduce typdef for weight vector