script to get used labels