adding a map to keep track of inactive and terminating instances
making status checking call async