refactored the loop; initialize the labels correctly; change the padding