Added custom order as an option in query