migrating Label code to labels.html