Main Labelling function done