added status check