new get tag contents function