update submit code