add SetupCodeMarking function