new function for add code marking