helmert_code function

Use helmert coding