add check order function