strpos for checking attributes with multiple classes, etc.
renamed variables for clarity