order function for admin page