query entities based on their active status

Added ability to query entities based on their active  status