Changed code input to optional