update to use tagname instead of hardcoded q