Creating the mark orders function