Modified logic to only include status pending & submitted