added hook_query_TAG_alter function