added pending status check