surround function to change tag with attributes