assigning correct tag