add fields to code