update code with optionals values