added code to support #tag and @tag