Improvement generic typing