added filtering for instances by tag