final_proj.pl add logic for multiple order directives