# Combining several levels answers in code

Normalise each `levels` answer to 0 to 1, then weight in your own code.

```ts
const norm = (a: { value: number; legend: Record<string, string> }) => a.value / (Object.keys(a.legend).length - 1);
const fit = 0.5 * norm(r.answers.skills) + 0.3 * norm(r.answers.values) + 0.2 * norm(r.answers.energy);
```

Keep the raw answers. Changing a weight should not need the person again. If one dimension is a hard rule ("any serious concern blocks"), test it on its own instead of averaging it away.