changed tag function to return sentence object

changed tag function to return sentence object