added status checking;