regenerate attributes code